const int analogOutPin=6;
int fadeAmount = 5;
unsigned char ledLight=0;

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
pinMode(analogOutPin, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
//ledLight ++;

ledLight = ledLight + fadeAmount;
ledLight %= 256;
if ( ledLight == 0 || ledLight == 255){
fadeAmount = -fadeAmount;}
Serial.println(ledLight);
analogWrite(analogOutPin , ledLight);
delay(1000);
}
